//
//  DSTipsManager.m
//  DaBaiService
//
//  Created by Mac-Mini-KingVision on 15/10/9.
//  Copyright © 2015年 Mac-Mini-KingVision. All rights reserved.
//

#import "LYTipsManager.h"
#import "MBProgressHUD.h"

#define TipsDuration 1
@implementation LYTipsManager


+(void)showTipsWithOnlyText:(NSString *)text inView:(UIView *)inView
{
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:inView animated:YES];
    
    // Configure for text only and offset down
    hud.mode = MBProgressHUDModeText;
    hud.opacity = 0.5;
    hud.labelFont = [UIFont boldSystemFontOfSize:15.0];
    hud.labelText = text;
    hud.removeFromSuperViewOnHide = YES;
    [hud hide:YES afterDelay:TipsDuration];
}

+(void)showTipsInWindowWithOnlyText:(NSString *)text
{
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    [self showTipsWithOnlyText:text inView:window];
}
@end
